package com.cloud.lifecycle;

import org.springframework.context.SmartLifecycle;
import org.springframework.stereotype.Component;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/6/28 18:58
 * @Desc
 * @Remarks
 */
@Component
public class MyLifeCycle implements SmartLifecycle {
    @Override
    public void start() {
        System.out.println("==================应用已经启动了==================");
    }

    @Override
    public void stop() {
        System.out.println("==================应用准备停止了==================");
    }

    @Override
    public boolean isRunning() {
        System.out.println("==================我会被调用吗？==================");
        return false;
    }
}
